package mr.ali.webvideo.controller;


import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j;
import mr.ali.webvideo.model.CollectionPlayComment;
import mr.ali.webvideo.service.ICollectionPlayCommentService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Mr-ali
 * @since 2025-08-16
 */
@RestController
@RequestMapping("/h5/collectionPlayComment")
@Slf4j
public class CollectionPlayCommentController {

    @Resource
    private ICollectionPlayCommentService collectionPlayCommentService;
    @GetMapping("/list")
    public PageInfo<CollectionPlayComment> getCollectionCommentList(Integer pageNum, Integer pageSize, Integer videoId) {
        log.info("pageNum:{},pageSize:{},videoId:{}", pageNum, pageSize,videoId);
        return collectionPlayCommentService.getCollectionCommentList(pageNum, pageSize, videoId);
    }

    @GetMapping("/insert")
    public CollectionPlayComment insertComment(CollectionPlayComment collectionPlayComment) {
        return collectionPlayCommentService.insertComment(collectionPlayComment);
    }
}
